#ifndef TCPSEVER_H
#define TCPSEVER_H

#include <QWidget>
#include <QTcpServer>
#include <QTcpSocket>

QT_BEGIN_NAMESPACE
namespace Ui {
class TCPSever;
}
QT_END_NAMESPACE

class TCPSever : public QWidget
{
    Q_OBJECT

public:
    TCPSever(QWidget *parent = nullptr);
    ~TCPSever();
public slots:
    void onSendMsgToClient();
    void onCloseConnection();
    void onNewConnection();
    void onReay();

private:
    Ui::TCPSever *ui;
    QTcpServer *m_pTServer;
    QTcpSocket *m_pTSocket;
};
#endif // TCPSEVER_H
